﻿/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 * 
 * Released to the public domain, use at your own risk!
 ********************************************************/
using System;
using Microsoft.VisualStudio.Data.AdoDotNet;
using Microsoft.VisualStudio.Data;
using System.Runtime.InteropServices;
using Microsoft.Data.ConnectionUI;

namespace EffiProz.Designer
{
    [Guid("3b64b149-4956-48f3-a24d-a76916a915d7")]
    internal sealed class EfzProviderObjectFactory : AdoDotNetProviderObjectFactory
    {
        public EfzProviderObjectFactory()
        {
        }

        public override object CreateObject(Type objType)
        {
            if (objType == typeof(DataConnectionSupport))
                return new EfzDataConnectionSupport();

            if (objType == typeof(IDataConnectionProperties) || objType == typeof(DataConnectionProperties))
                return new EfzConnectionProperties();

            if (objType == typeof(IDataConnectionUIControl) || objType == typeof(DataConnectionUIControl))
                return new EfzConnectionUIControl();

            return base.CreateObject(objType);
        }
    }
}


